home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 March / Disc 2 / APC0403D2.ISO / workshop / gamserv / files / GHSetup.1.5.0004.exe / %MAINDIR% / Quake.gof < prev    next >
Encoding:
Text File  |  2004-01-15  |  8.6 KB  |  338 lines

  1. // Class definition for winquake.exe
  2.  
  3. class Quake
  4. {
  5.     /***************************************************************
  6.     * Begin of required properties for all GOFs.
  7.     * The 'Display' names should never be changed on these variables.
  8.     ***************************************************************/
  9.     [
  10.      Display("Host Name"), 
  11.      Description("The name of the server."),
  12.      Default("Quake Server"),
  13.      AlwaysBrowserVisible,
  14.     ]
  15.     string hostname;
  16.  
  17.     [
  18.      Display("Current Players"), 
  19.      Description("The current number of players connected to the server."), 
  20.      Readonly,
  21.      AlwaysBrowserVisible
  22.     ]
  23.     uint32 currentclients;
  24.  
  25.     [
  26.      Display("Maximum Players"), 
  27.      Description("The maximum number of players allowed on the server."), 
  28.      Default("8"),
  29.      AlwaysBrowserVisible,
  30.      CommandLineOnly
  31.     ]
  32.     uint32 maxplayers;
  33.  
  34.     [
  35.      Display("Port"), 
  36.      Description("The UDP port the server is using."), 
  37.      Readonly,
  38.      Default("26000") // This will be used when inserting a new server.
  39.     ]
  40.     uint32 port;
  41.  
  42.     [
  43.      Display("Game Directory"), 
  44.      Description(
  45.         "The directory used for additional map information.  "
  46.         "This indicates which mod the server is using."), 
  47.      CommandLineOnly,
  48.      Default("id1"),
  49.     ]
  50.     string game;
  51.  
  52.     [
  53.      Display("Extra Parameters"), 
  54.      Description(
  55.         "This property can be used to pass additional command-line "
  56.         "parameters to the game server."), 
  57.      Default("")
  58.     ]
  59.     string extraparam; // This name should never change.
  60.  
  61.     [
  62.      Display("Initial Level"),
  63.      Description("When the server first starts it will use this level."),
  64.      ValueMap{
  65.         "start","e1m1","e1m2","e1m3",
  66.         "e1m4","e1m5","e1m6","e1m7",
  67.         "e1m8","e2m1","e2m2","e2m3",
  68.         "e2m4","e2m5","e2m6","e2m7",
  69.         "e3m1","e3m2","e3m3","e3m4",
  70.         "e3m5","e3m6","e3m7","e4m1",
  71.         "e4m2","e4m3","e4m4","e4m5",
  72.         "e4m6","e4m7","e4m8","end",
  73.         "dm1","dm2","dm3","dm4","dm5",
  74.         "dm6","dm7" },
  75.      Values{
  76.         "Introduction","Slipgate Complex","Castle Of The Damned","The Necropolis",
  77.         "The Grisly Grotto","Gloom Keep","The Door To Chthon","The House Of Chthon",
  78.         "Ziggurat Vertigo","The Installation","The Ogre Citadel","The Crypt Of Decay",
  79.         "The Ebon Fortress","The Wizard's Manse","The Dismal Oubliette","Underearth",
  80.         "Termination Central","The Vaults Of Zin","The Tomb Of Terror","Satan's Dark Delight",
  81.         "Wind Tunnels","Chambers Of Torment","The Haunted Halls","The Sewage System",
  82.         "The Tower Of Despair","The Elder God Shrine","The Palace Of Hate","Hell's Atrium",
  83.         "The Pain Maze","Azure Agony","The Nameless City","Shub-Niggurath's Pit",
  84.         "Place Of Two Deaths","Claustrophobopolis","The Abandoned Base","The Bad Place",
  85.         "The Cistern","The Dark Zone","Aracnophobia"    },
  86.      Default("Gloom Keep")
  87.     ]
  88.     string initlevel;
  89.  
  90.  
  91.     [
  92.      Display("Current Level"),
  93.      Description("The current map the server is using."),
  94.      AlwaysBrowserVisible,
  95.      Readonly,
  96.      UsesValues("initlevel")
  97.     ]
  98.     string mapname;
  99.  
  100.     [
  101.      Display("Time Limit"), 
  102.      Description(
  103.         "The number of minutes the server will remain on a level.  "
  104.         "If this is 0 there is no time limit."),
  105.      AlwaysBrowserVisible,
  106.      Default("0") 
  107.     ]
  108.     uint32 timelimit;
  109.  
  110.     [
  111.      Display("Score Limit"), 
  112.      Description(
  113.         "When a player's score reaches this level, the server will change "
  114.         "to the next map.  If this number is 0 there is no score limit."),
  115.      AlwaysBrowserVisible,
  116.      Default("0") 
  117.     ]
  118.     uint32 fraglimit;
  119.     /***************************************************************
  120.     * End of required properties for all GOFs.
  121.     ***************************************************************/
  122.  
  123.  
  124.     [
  125.      Display("Quake Protocol"),
  126.      Description("The Quake protocol number the server is using."), 
  127.      Readonly,
  128.      AlwaysBrowserVisible,
  129.     ]
  130.     string protocol;
  131.  
  132.     [
  133.      Display("Cooperative Mode"), 
  134.      Description(
  135.         "Enables cooperative play.  When this "
  136.         "property is enabled 'Deathmatch Mode' is ignored."), 
  137.      Default("False"),
  138.      AfterLevelChange,
  139.     ]
  140.     boolean coop;
  141.  
  142.     [
  143.      Display("Deathmatch Mode"), 
  144.      Description("Sets deathmatch options."), 
  145.      Values{
  146.         "Disabled",
  147.         "Weapons vanish, items respawn",
  148.         "Weapons don't vanish, items don't respawn",
  149.         "Weapons don't vanish, items respawn"},
  150.      Default("Weapons vanish, items respawn") 
  151.     ]
  152.     uint32 deathmatch;
  153.  
  154.     [
  155.      Display("Command-line"),
  156.      Description("The command-line used to launch the server."), 
  157.      AlwaysBrowserVisible,
  158.      Readonly
  159.     ]
  160.     string cmdline;
  161.  
  162.     [
  163.      Display("No Exit"),
  164.      Description("If enabled players are not allowed to exit levels."), 
  165.      AlwaysBrowserVisible,
  166.      Default("True") 
  167.     ]
  168.     boolean noexit;
  169.  
  170.     [
  171.      Display("Repeat Same Level"),
  172.      Description("If enabled the server will always stay on the "
  173.       "same map."), 
  174.      Default("False") 
  175.     ]
  176.     boolean samelevel;
  177.  
  178.     [
  179.      Display("Gravity"),
  180.      Description("The gravity used in the game."), 
  181.      AlwaysBrowserVisible,
  182.      Default("800") 
  183.     ]
  184.     uint32 sv_gravity;
  185.  
  186.     [
  187.      Display("Player Acceleration"),
  188.      Description(
  189.         "You can control the how long it takes the player to "
  190.         "accelerate to full speed.  If this value is lowered "
  191.         "to 5 it will take the player twice as long reach "
  192.         "maximum running speed."), 
  193.      Default("10") 
  194.     ]
  195.     uint32 sv_accelerate;
  196.  
  197.     [
  198.      Display("Aim Leniency"),
  199.      Description(
  200.         "This variable controls how lenient the server is when it "
  201.         "comes to the player's aim. 0.93 allows a player to shoot "
  202.         "a little off the target and still score a hit, 1.0 forces "
  203.         "players to shoot dead on."),
  204.       Default("1.0") 
  205.     ]
  206.     string sv_aim;
  207.  
  208.     [
  209.      Display("Friction"),
  210.      Description("This variable controls player friction."),
  211.      AlwaysBrowserVisible,
  212.       Default("4") 
  213.     ]
  214.     uint32 sv_friction;
  215.  
  216.     [
  217.      Display("Maximum Player Speed"),
  218.      Description("This variable controls the maximum player speed."),
  219.      AlwaysBrowserVisible,
  220.       Default("320") 
  221.     ]
  222.     uint32 sv_maxspeed;
  223.  
  224.     [
  225.      Display("Maximum Velocity"),
  226.      Description("This variable controls the maximum object speed."),
  227.       Default("2000") 
  228.     ]
  229.     uint32 sv_maxvelocity;
  230.  
  231.     [
  232.      Display("No Automatic Step"),
  233.      Description("If enabled players will have to jump to go up stairs."),
  234.       Default("False") 
  235.     ]
  236.     boolean sv_nostep;
  237.  
  238.     [
  239.      Display("Stop Speed"),
  240.      Description(
  241.         "The velocity at which players will start slowing down "
  242.         "to stop their movement."),
  243.       Default("100") 
  244.     ]
  245.     uint32 sv_stopspeed;
  246.  
  247.     [
  248.      Display("Tick Rate"),
  249.      Description(
  250.         "The amount of time (in seconds) between consecutive packets "
  251.         "sent by the server to clients.  Use 0.05 for LAN games and "
  252.         "0.1 for games that will have modem players."),
  253.       Default("0.05") 
  254.     ]
  255.     string sys_ticrate;
  256.  
  257.     [
  258.      Display("Team Play"),
  259.      Description("Determines team play options."),
  260.      Values{
  261.         "Disabled",
  262.         "Friendly fire disabled",
  263.         "Friendly fire enabled" },
  264.      AlwaysBrowserVisible,
  265.       Default("Disabled") 
  266.     ]
  267.     uint32 teamplay;
  268.  
  269.     [
  270.      MethodVar,
  271.      Display("Map Name"),
  272.      Description(""),
  273.      UsesValues("initlevel")
  274.     ]
  275.     string map;
  276.  
  277.     [
  278.      Display("Set Level"),
  279.      Description("Sets the map, but disconnects players while doing so."),
  280.      ConsoleCommand("map %1")
  281.     ]
  282.     void SetLevel(MethodVar map);
  283.  
  284.     /***************************************************************
  285.     * Begin of required methods for all GOFs.
  286.     * The names of these methods should never be changed.
  287.     ***************************************************************/
  288.     [
  289.      Display("Change Current Level"),
  290.      Description("Changes the current level without disconnecting the players."),
  291.      ConsoleCommand("changelevel %1")
  292.     ]
  293.     void ChangeLevel(MethodVar map);
  294.  
  295.     [
  296.      Display("Set Property"),
  297.      Description("Sets a server property."),
  298.      ConsoleCommand("%1 \"%2\"")
  299.     ]
  300.     void SetProperty(string strVar, string strValue);
  301.  
  302.     /***************************************************************
  303.     * End of required methods for all GOFs.
  304.     ***************************************************************/
  305.     
  306.     
  307.     /***************************************************************
  308.     * Begin of recommended methods for all GOFs.
  309.     * The names of these methods should never be changed.
  310.     ***************************************************************/
  311.     [
  312.      Display("Kick Player from Server"),
  313.      Description("Removes player from server."),
  314.      ConsoleCommand("kick %1")
  315.     ]
  316.     void KickPlayerByName(string strName);
  317.     /***************************************************************
  318.     * End of recommended methods for all GOFs.
  319.     ***************************************************************/
  320.     
  321.     
  322.     [
  323.      Display("Execute Config File"),
  324.      Description("Executes a config file of console commands."),
  325.      ConsoleCommand("exec %1")
  326.     ]
  327.     void Exec(string strMasterList);
  328.  
  329.     [
  330.      Display("Status"),
  331.      Description("Gets the status of the game server."),
  332.      ConsoleCommand("status")
  333.     ]
  334.     void Status();
  335.  
  336. };
  337.     
  338.